package com.matrix.common.aspect;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @author 有点甜
 * @since 2025/8/6
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Idempotent {

    String prefix() default "";

    long expireTime() default 3;

    TimeUnit timeUnit() default TimeUnit.SECONDS;

    long cacheTime() default 10;

    TimeUnit cacheTimeUnit() default TimeUnit.MINUTES;

    String message() default "操作过于频繁,请勿重复提交";
}
